﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SMainCityBattleOpenMsg extends IMessageBase
    {
        public var schedule:int;
        public var accessGuilds:Array;
        public var winAheadGuilds:Array;
        public var openDt:Date;
        public var endDt:Date;
        public const _type:int = 257;
        public static var _regist:SMainCityBattleOpenMsg = new SMainCityBattleOpenMsg(true);

        public function SMainCityBattleOpenMsg(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SMainCityBattleOpenMsg();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.schedule);
            SeqEntityIdHelper.write(param1, this.accessGuilds);
            SeqEntityIdHelper.write(param1, this.winAheadGuilds);
            param1.writeDate(this.openDt);
            param1.writeDate(this.endDt);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.schedule = param1.readInt();
            this.accessGuilds = SeqEntityIdHelper.read(param1);
            this.winAheadGuilds = SeqEntityIdHelper.read(param1);
            this.openDt = param1.readDate();
            this.endDt = param1.readDate();
            return;
        }// end function

    }
}
